<?
$db_os = new db_query('SELECT * FROM online_supports WHERE os_active = 1 AND lang_id = ' . $lang_id . ' ORDER BY os_order ASC');
$num_rows = mysql_num_rows($db_os->result);
if ($num_rows > 0)
{
?>
<div class="module_small module_small_estore_support_online">
	<div class="title">
		<div class="fl left_icon"></div>
		<div class="fl"><span lang="<?=$array_lang[$lang_id][0];?>"><?=tdt('Ho_tro_truc_tuyen');?></span></div>
		<div class="fr right_icon"></div>
	</div>
	<div class="content padding">
		<div class="estore_support_online">
		<?
		$i = 0;
		while ($os = mysql_fetch_array($db_os->result))
		{
			++$i;
			if ($i == $num_rows)
			{
				$class = 'end';
			}
			else
			{
				$class = 'normal';
			}
			if ($os['os_type'] == 1)
			{
				$href = 'ymsgr:SendIM?' . $os['os_nickname'];
				$src = 'http://opi.yahoo.com/online?u=' . $os['os_nickname'] . '&amp;m=g&amp;t=0&amp;l=us';
			}
			else if ($os['os_type'] == 2)
			{
				$href = 'skype:' . $os['os_nickname'] . '?chat';
				$src = 'http://mystatus.skype.com/smallicon/' . $os['os_nickname'];
			}
			else
			{
				$href = '#';
			}
		?>
			<div class="<?=$class;?>"><a href="<?=$href;?>" rel="nofollow"><img src="<?=$src;?>" /><?=$os['os_title'];?></a></div>
		<?
		}
		?>
		</div>
	</div>
</div>
<div class="module_bottom_small"><div class="fl"></div><div class="fr"></div></div>
<?
}
unset($db_os);
?>